var express = require('express')
var cors = require('cors')
var app = express()
app.use(cors())
app.use(express.static(__dirname + '/piblic'))
app.get('/tesc', function (req, res) {
    res.json("Access-Control-Allow-Origin", "http://localhost:3001");
    res.setHeader('Access-Control-Allow-Methods', 'POSt,GET,DELETE,HEAD')
})
app.listen(3000, function (err) {
    if (err) console.log(err);
    else console.log('启动成功');
})

